test: add cross-platform build matrix#999
Conversation
seherv
left a comment
There was a problem hiding this comment.
On second thought, can you make it so it runs tests for all Python versions on Linux, and tests only 3.10 and 3.13 on Windows and Mac?
|
Updated the matrix per the review: Linux now runs 3.10, 3.11, 3.12, 3.13, and 3.14; Windows and macOS run only 3.10 and 3.13. Verification run locally: /tmp/actionlint/actionlint .github/workflows/build.yaml
git diff --check
python - <<'PY'
import yaml
from pathlib import Path
workflow = yaml.safe_load(Path('.github/workflows/build.yaml').read_text())
include = workflow['jobs']['build']['strategy']['matrix']['include']
actual = [(item['os'], item['python_version'], item['tox_env']) for item in include]
expected = [
('ubuntu-latest', '3.10', 'py310'),
('ubuntu-latest', '3.11', 'py311'),
('ubuntu-latest', '3.12', 'py312'),
('ubuntu-latest', '3.13', 'py313'),
('ubuntu-latest', '3.14', 'py314'),
('windows-latest', '3.10', 'py310'),
('windows-latest', '3.13', 'py313'),
('macos-latest', '3.10', 'py310'),
('macos-latest', '3.13', 'py313'),
]
if actual != expected:
raise SystemExit(f'matrix mismatch: {actual!r}')
print('matrix OK:', actual)
PY |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #999 +/- ##
==========================================
- Coverage 86.63% 81.46% -5.17%
==========================================
Files 84 139 +55
Lines 4473 13525 +9052
==========================================
+ Hits 3875 11018 +7143
- Misses 598 2507 +1909 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
2f034c3 to
2d13963
Compare
|
Updated this PR after the Windows matrix exposed a cross-platform test assertion issue. What changed:
Local verification:
The new GitHub Actions runs for commit |
Signed-off-by: Rayan Salhab <7407177+cyphercodes@users.noreply.github.com>
|
Updated this PR to address the Windows failures from the latest CI run. What changed:
Local verification:
Note: the earlier |
Description
Adds Windows and macOS runners to the main
build.yamlbuild/test job so PR and merge queue validation covers all supported platforms, not only Ubuntu. The unit-test job now uses an explicit tox environment from the matrix instead of a POSIX shell substitution, which keeps the step portable across GitHub-hosted Linux, Windows, and macOS runners. Typing remains Linux-only because it is platform-independent and the lint job already stays Linux-only.Issue reference
Closes #998
Verification
.github/workflows/build.yamlwith PyYAML and asserted the expected OS/Python tox matrix is present.actionlint .github/workflows/build.yaml.git diff --check.Checklist